<template>
  <div name="InteractionList">
    <div class="s-questionList">
      <template v-if="questionList && questionList.length > 0">
        <div class="item" v-for="d in questionList" :key="d.id">
          <div class="questionW">
            <p>问： {{ d.title }}</p>
            <p>答： {{ d.content }}</p>
          </div>
          <div class="time">{{ d.create_time ? d.create_time.substr(0, 10) : "" }}</div>
        </div>
      </template>
      <el-empty v-else></el-empty>
    </div>
  </div>
</template>
<script>
export default {
  name: "InteractionList",
  data() {
    return {
      questionList: [],
    };
  },
  mounted() {
    this.getData();
  },
  methods: {
    getData() {
      this.$http
        .get("/iaiqsmde9fea569965ed56ab98ea0501752fe631902841e/interactive/queryQuestion")
        .then(res => {
          if (res.code == 0) {
            this.questionList = res.data.rows;
          }
        })
        .catch(err => {
          console.log(err.message || "数据异常");
        });
    },
  },
};
</script>
